import * as daytime from './daytime'
import * as random from './random'
import * as validator from './validator'
import title from './title'

const plugin = [
  {
    label: '$daytime',
    value: daytime
  },
  {
    label: '$random',
    value: random
  },
  {
    label: '$validator',
    value: validator
  }
]

const install = Vue => {
  if (install.installed) return
  plugin.map(element => {
    Object.defineProperty(Vue.prototype, element.label, {
      value: element.value
    })
  })
  Vue.use(title)
}

export default {
  install
}
